﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace PuzzleMaker
{
    public class Tile
    {
        private int tilesetID;
        private int posX;
        private int posY;

        public Tile()
        {
            tilesetID = -1;
            posX = 0;
            posY = 0;
        }

        public Tile(int id, int x, int y)
        {
            tilesetID = id;
            posX = x;
            posY = y;
        }

        public Tile(Tile tile)
        {
            tilesetID = tile.tilesetID;
            posX = tile.posX;
            posY = tile.posY;
        }

        public bool Same(Tile tile)
        {
            if (tile.PosX == posX)
                if (tile.PosY == posY)
                    if (tile.TilesetID == tilesetID)
                        return true;
            return false;
        }

        public int TilesetID
        {
            get { return tilesetID; }
            set { tilesetID = value; }
        }
        public int PosX
        {
            get { return posX; }
            set { posX = value; }
        }
        public int PosY
        {
            get { return posY; }
            set { posY = value; }
        }
    }
}
